<html>
	<head>
		<title></title>
		<meta charset="utf-8" />
	</head>
	<body>
		<span class="update"></span>
		<input class="white" type="text" />
	</body>
	<script>
		var obj = {};
		var Inp = document.getElementsByClassName("white")[0];
		var Spn = document.getElementsByClassName("update")[0]
		Object.defineProperty(obj,'change',{
			set: function(newText){          //set当数据更新写入时候调用
				Spn.innerHTML = newText;       //get读取数据时候调用
				Inp.value = newText;
			
			}
		})
		
		
		Inp.addEventListener('focus',function(e){
			document.addEventListener('keyup',function(e){
				obj.change = e.target.value;
			})
			
			
		})
		
	</script>
</html>